package com.company;

import java.util.Scanner;

public class Main28 {
    public static void main(String[] args) {
        Scanner sr=new Scanner(System.in);
        boolean[] zzh=new boolean[100];
        System.out.println("请输入灯数");
        int a= sr.nextInt();
        System.out.println("请输入人数");
        int b= sr.nextInt();
        System.out.println(zzh[0]);
         for (int i=0;i<a;i++){//创建灯true是打开false是关闭
                if (b>=1)zzh[i]=true;
         }
         //第i盏灯是的下标我为i-1不会关掉从第二个灯开始判断
         for (int i=1;i<a;i++)
             //从第二个人开判断
           for(int y=2;y<=b;y++){
             if((i)%y==0){
                 zzh[i+1]=!zzh[i+1];
             }
           }

        for (int i=0;i<a;i++){
            if (zzh[i]==true){
                System.out.println((i+1)+"  ");
            }
        }
    }
}
